package org.csmzxy.class2333;

public class Example19 {
    public static void main(String[] args) {
        int arr[] = {52, 63, 1, 14, 36, 95, 6, 10, 27, 40};
        int max = arr[0];
        int index = 0;
        for (int i = 1; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];
                index = i;
            }
        }
        System.out.println("最大值是：" + max);
        System.out.println("最大值位于数组中的第 " + (index + 1) + "个位置");
    }
}
